1. Field of the Invention
The present invention relates to a method and apparatus for changing resolution of encoded digital images.
2. Description of the Related Art
Usually, image data has an enormous amount of information. Hence, when image data is transmitted or is recorded on a storage medium, the image data needs to be subjected to some kind of highly-efficient compression processing. As for highly-efficient compression processing, a method using orthogonal transformation encoding processing (for example, DCT (Discrete Cosine Transform)) has now become mainstream. The method is adopted as methods of JPEG (Joint Photographic coding Expert Group) and MPEG (Moving Picture coding Expert Group). The encoding methods will be described in brief.
First, inputted image data is split in blocks of 8×8 pixels. Basically, compression processing is performed by this block. The pixels split in blocks are subjected to orthogonal transformation encoding processing, quantization processing, and then entropy encoding processing, whereby encoded data is obtained. When the encoded data is decoded, the encoded data is subjected in sequence to processings opposite to the encoding processings. Since the orthogonal transformation encoding processing is irreversible processing, original image data can not be completely decoded but the orthogonal transformation encoding processing can realize a very high compression ratio.
On the other hand, image data needs to be subjected to resolution changing (transformation) processing according to the circumstances. When image data taken by a digital camera is displayed on a display medium, if the resolution of image data is higher than the resolution of the display medium, the image data needs to be reduced for display. Also when moving pictures like digital TV broadcast are displayed on a display medium, the resolution of image data needs to be changed according to the resolution of the display medium. Various techniques have been thought for the resolution changing processing of the image data and are broadly divided into resolution changing in a space domain and resolution changing in a frequency domain.
Typical resolution changing methods in a space domain include a nearest neighbor interpolation, a bilinear interpolation, and a bicubic interpolation. Features of these methods are shown in FIG. 4. FIG. 4 shows interpolation pixels ◯ when original pixels shown by x are enlarged by 3 times. A vertical axis in FIG. 4 represents the magnitude of a pixel value.
In the nearest neighbor interpolation, the value of an original pixel nearest to a pixel position after transformation is made a new pixel value. Since an operation is not performed for original pixels, a processing speed is high and the difference (edge) between the neighboring pixels of the image can be held as the original image but image quality is said to be usually not good.
The bilinear interpolation is a kind of linear interpolation and performs linear interpolation by using four pixels near a pixel value to be determined. As compared with the nearest neighbor interpolation, the bilinear interpolation can improve image quality but decreases in processing speed. Further, the linear interpolation processing smoothes a portion changing sharply such as an edge of the image, resulting in causing the image appear blurred as a whole.
The bicubic interpolation is a kind of cubic interpolation and performs interpolation by using 16 pixels near a pixel value to be determined. In the bicubic interpolation, a large amount of operation needs to be performed and hence a processing speed is very slow. However, the bicubic interpolation has an effect of enhancing and holding the edge of an original image and hence causes the image to appear less blurred as compared with the bilinear interpolation. The bicubic interpolation is better in image quality than the two techniques described above.
The resolution changing method in a frequency domain is such that adds or deletes pixel values in a state where the image data is subjected to DCT processing to change resolution. When this method is applied to an image stored in a bit map format, pixel values need to be subjected to processing of DCT→resolution changing→IDCT, resulting in increasing processing cost. However, this mode can be applied easily and effectively to images encoded by DCT encoding such as MPEG and JPEG and is said to produce good image quality.
The resolution changing of image data is performed by a method that is selected from these methods so as to serve the object. If resources required to perform the resolution changing processing can be neglected, it is desirable to adopt the bicubic interpolation capable of holding the edge of the image. However, the bicubic interpolation involves a problem of increasing processing cost and a problem of causing images appear blurred near edges, so that a technique of switching resolution changing methods between near the edge of image data and in the other domain is proposed as disclosed in U.S. Pat. No. 5,008,752 (Japanese Unexamined Patent Publication No. 4-500421) and U.S. Pat. No. 6,263,120 (Japanese Unexamined Patent Publication No. 11-144053).
However, the resolution changing processing by the bicubic interpolation is sufficiently satisfactory for the image data of JPEG or MPEG encoded by the above-described orthogonal transformation encoding. In the encoding using the orthogonal transformation encoding, image data is encoded by block as described above, so that there are cases where a discontinuous portion occurs on the boundary of a split block of 8×8 pixels. This is called block noise. Block noise more easily occurs as the compression ratio of an encoded image is increased.
If the decoded image data having this block noise is subjected to the resolution changing processing of the bicubic interpolation, there is a possibility that the discontinuous portion of the block boundary is enhanced to increase block noise to degrade image quality remarkably.